<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title>Hello MUI</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">

		<!--标准mui.css-->
		<link rel="stylesheet" href="./css/mui.min.css">
		<!--App自定义的css-->
		<link rel="stylesheet" type="text/css" href="./css/app.css" />
	</head>

	<body>
		<header class="mui-bar mui-bar-nav">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title" id="main_page3_title">cardview（卡片视图）</h1>
		</header>
		<div class="mui-content">
			
			
			<div class="mui-card">
				<div class="mui-card-header mui-card-media" style="height:40vw;background-image:url(./images/cbd.jpg)"></div>
				<div class="mui-card-content">
					<div class="mui-card-content-inner">
						<p id="main_page3_updatetime">Posted on January 18, 2016</p>
						<p style="color: #333;" id="main_page3_content">这里显示文章摘要，让读者对文章内容有个粗略的概念...</p>
					</div>
				</div>
				<div class="mui-card-footer">
					<a class="mui-card-link" id="main_page3_short">xx:Like</a>
					<a class="mui-card-link" id="main_page3_userid">Read more</a>
				</div>
			</div>
		
		</div>
		<script src="./js/mui.min.js"></script>
		<script>
			// mui.previewImage();
			//接收id
			// alert(getVar("id"));
			function getVar(varName) {
				var query = window.location.search.substring(1);//search就是地址栏？后面的东西,substring就是第几个参数
				var vars = query.split('&');
				for (var i = 0; i < vars.length; i++) {
					var pair = vars[i].split("=");
					if (pair[0] == varName) {
						return pair[1];
					}
				}
				return false;
			}
			
			mui.ajax('http://localhost:8080/jeecg-boot//cloud_disk/appcontroller/app/get',{//开头第一个参数是地址
						data:{
							id:getVar("id")//左边是告诉它传id,:右边是值
						},
						dataType:'json',//服务器返回json格式数据
						type:'get',//HTTP请求类型
						timeout:10000,//超时时间设置为10秒；
						success:function(res){
							console.log(res);
							main_page3_title.innerHTML=res.result.fileName;
							main_page3_content.innerHTML=res.result.fileName;
							main_page3_updatetime.innerHTML=res.result.updateTime;
							main_page3_userid.innerHTML='用户名：'+res.result.userId;
							main_page3_short.innerHTML='类型：'+res.result.sortInfo;
						},
						error:function(xhr,type,errorThrown){
							
						}
					});
		</script>
	</body>

</html>